package com.dq.eduservice.service;

import com.dq.commonutils.dto.OrderCourseVo;
import com.dq.eduservice.entity.EduCourse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dq.eduservice.vo.BasicCourseInfoVo;
import com.dq.eduservice.vo.CoursePubulishVo;
import com.dq.eduservice.vo.CourseVo;
import com.dq.eduservice.vo.FrontCourseVo;
import com.dq.eduservice.vo.param.CourseParam;
import com.dq.eduservice.vo.param.PageParam;
import com.dq.eduservice.vo.param.front.CourseFrontParam;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 课程(EduCourse)表服务接口
 *
 * @author Dq
 * @since 2022-07-22 19:48:50
 */
@Transactional
public interface EduCourseService  extends IService<EduCourse> {

    /**
     * 添加课程信息
     * @param courseParam
     */
    String addCourse(CourseParam courseParam);

    /**
     * 查询课程的基本信息
     * @param courseId
     * @return
     */
    CourseParam getCourseInfo(String courseId);

    /**
     * 修改课程
     * @param courseParam
     */
    void updateCourseInfo(CourseParam courseParam);

    /**
     * 根据课程id查询最终发布所需要确认的信息
     * @param courseId
     * @return
     */
    CoursePubulishVo getPublishCourseInfo(String courseId);

    /**
     * 获取条件查询出来的课程列表
     * @param pageParam
     * @return
     */
    Map<String,Object> getCourseBasicInfoByPageCondition(PageParam pageParam);

    /**
     * 删除所有课程信息
     * @param courseId
     */
    void deleteCourseAllInfo(String courseId);

    /**
     * 获取前端课程需要的数据
     * @param courseFrontParam
     * @return
     */
    Map<String, Object> getCourseFrontList(CourseFrontParam courseFrontParam);

    /**
     * 获取最终课程信息
     * @param courseId
     * @return
     */
    FrontCourseVo getFinalCourseDetailInfo(String courseId);



    //远程调用

    /*
     @from service-order服务
    */

    /**
     * 根据课程id返回课程信息
     * @param courseId
     * @return
     */
    OrderCourseVo getOrderCourseInfo(String courseId);
}